import 'package:lyf_shop/http/request/base_request.dart';

/// 网络请求抽象类
abstract class LyfNetAdapter {
  Future<LyfNetResponse<T>> send<T>(BaseRequest request);
}

/// 统一网络层 返回格式
class LyfNetResponse<T> {
  LyfNetResponse(
      {this.data,
      this.request,
      this.code = -1,
      this.message = '服务开小差了 别走开',
      this.extra});

  T? data;
  BaseRequest? request;
  int code;
  String message;
  dynamic extra;
}
